home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1179 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.2 KB

  1. Path: gate.net!not-for-mail
  2. From: feathers@gate.net (Michael Feathers)
  3. Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
  4. Subject: Re: Hungarian notation
  5. Date: 9 Jan 1996 07:43:09 -0500
  6. Organization: CyberGate, Inc.
  7. Message-ID: <4ctnst$egc@hopi.gate.net>
  8. References: <30C40F77.53B5@swsbbs.com> <marnoldDJEvtJ.1Lx@netcom.com> <4aleun$jlk@ns.RezoNet.NET> <marnoldDJMDBG.CFz@netcom.com> <4asnkr$7b0@solutions.solon.com> <4ath75$e7i@barnacle.iol.ie> <4b4kij$svt@news.microsoft.com> <dewar.819489496@schonberg> <4bd
  9.  <4cne0e$1020@seminole.gate.net> <DKvrwL.5yu@irvine.com>
  10. NNTP-Posting-Host: hopi.gate.net
  11. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  12.  
  13. Adam Beneschan (adam@irvine.com) wrote:
  14. : feathers@gate.net (Michael Feathers) writes:
  15. : >
  16. : >   If anyone does not think that type is important information that ought
  17. : >   to kept in mind for semantic purposes, just consider this: someone
  18. : >   anonymously offers you sex.  The type of person offering it should
  19. : >   be important to you, unless you are bisexual, and even then you
  20. : >   might like to know as some casting may be required.  :-)
  21. : >
  22. : >
  23. : >   -Mike (master of silly analogies)
  24. : I agree with your last point--i.e. that this is a silly analogy.  To
  25. : carry the silliness even further: you probably care what gender a
  26. : person is before you have sex with them, but if you're an employer
  27. : looking for someone to fill a position, you probably don't, or
  28. : shouldn't, care; all you're concerned with is what purpose you're
  29. : going to be using the person for.
  30.  
  31. True enough, but remember that 'person' is a type also (or rather 
  32. a class), and you wouldn't want to employ rocks or ball-point
  33. pens.
  34.  
  35. In the presence of polymorphism, I could be happy that:
  36.     Employ (persBetty)
  37. or  
  38.     Employ (femBetty)
  39.  
  40. as long as I know that females are a subclass of persons.
  41. These class relationships are far easier to remember than 
  42. the type of every variable in a program.
  43.  
  44. : Now, which of these analogies corresponds more closely to how
  45. : variables in a program are used?
  46. : (1) Using the variables for a purpose
  47. : (2) Having sex with the variables
  48.  
  49. It depends on how much programming excites you.
  50.  
  51. :-()
  52.  
  53.  
  54.